package com.ruoyi.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.CommunityRewardMapper;
import com.ruoyi.web.domain.CommunityReward;
import com.ruoyi.web.service.ICommunityRewardService;

/**
 * 社区签到奖励关联表Service业务层处理
 *
 * @author jiwei
 * @date 2024-05-12
 */
@Service
public class CommunityRewardServiceImpl extends ServiceImpl<CommunityRewardMapper, CommunityReward> implements ICommunityRewardService {
    @Autowired
    private CommunityRewardMapper communityRewardMapper;

    /**
     * 查询社区签到奖励关联表
     *
     * @param id 社区签到奖励关联表主键
     * @return 社区签到奖励关联表
     */
    @Override
    public CommunityReward selectCommunityRewardById(Long id) {
        return communityRewardMapper.selectCommunityRewardById(id);
    }

    /**
     * 查询社区签到奖励关联表列表
     *
     * @param communityReward 社区签到奖励关联表
     * @return 社区签到奖励关联表
     */
    @Override
    public List<CommunityReward> selectCommunityRewardList(CommunityReward communityReward) {
        return communityRewardMapper.selectCommunityRewardList(communityReward);
    }

    /**
     * 新增社区签到奖励关联表
     *
     * @param communityReward 社区签到奖励关联表
     * @return 结果
     */
    @Override
    public int insertCommunityReward(CommunityReward communityReward) {
            return communityRewardMapper.insertCommunityReward(communityReward);
    }

    /**
     * 修改社区签到奖励关联表
     *
     * @param communityReward 社区签到奖励关联表
     * @return 结果
     */
    @Override
    public int updateCommunityReward(CommunityReward communityReward) {
        return communityRewardMapper.updateCommunityReward(communityReward);
    }

    /**
     * 批量删除社区签到奖励关联表
     *
     * @param ids 需要删除的社区签到奖励关联表主键
     * @return 结果
     */
    @Override
    public int deleteCommunityRewardByIds(Long[] ids) {
        return communityRewardMapper.deleteCommunityRewardByIds(ids);
    }

    /**
     * 删除社区签到奖励关联表信息
     *
     * @param id 社区签到奖励关联表主键
     * @return 结果
     */
    @Override
    public int deleteCommunityRewardById(Long id) {
        return communityRewardMapper.deleteCommunityRewardById(id);
    }
}
